#ifndef __MEMORY_POOL_H__
#define __MEMORY_POOL_H__

#include "Prerequisites.h"

#define KDTREE_POOL_SIZE 100000
#define TRIANGLE_PTR_POOL_SIZE 10000


namespace RTRT {
	
	class MemoryPool : 
	{
	public:
		MemoryPool();
		~MemoryPool();
		
		TriangleList *newTriListEntry();
		void freeTriListEntry();
		KDTreeNode *newKDTreeNodePair();
		
	private:
		char *m_nodePool;
		char *m_triPtrPool;
		
		KDTreeNode *m_kdNodePtr;
		TriangleList *m_triListPtr;
		
		
	}
}


#endif